/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package azhar.persistance;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Al-Insan
 */
@Entity
@Table(name = "inbox", catalog = "sms_center", schema = "")
@NamedQueries({
    @NamedQuery(name = "Inbox.findAll", query = "SELECT i FROM Inbox i"),
    @NamedQuery(name = "Inbox.findById", query = "SELECT i FROM Inbox i WHERE i.id = :id"),
    @NamedQuery(name = "Inbox.findByPengirim", query = "SELECT i FROM Inbox i WHERE i.pengirim = :pengirim"),
    @NamedQuery(name = "Inbox.findByIsiPesan", query = "SELECT i FROM Inbox i WHERE i.isiPesan = :isiPesan"),
    @NamedQuery(name = "Inbox.findByWaktu", query = "SELECT i FROM Inbox i WHERE i.waktu = :waktu"),
    @NamedQuery(name = "Inbox.findBySmsc", query = "SELECT i FROM Inbox i WHERE i.smsc = :smsc"),
    @NamedQuery(name = "Inbox.findByStatus", query = "SELECT i FROM Inbox i WHERE i.status = :status")})
public class Inbox implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "pengirim")
    private String pengirim;
    @Lob
    @Basic(optional = false)
    @Column(name = "isi_pesan", length = 2147483647)
    private String isiPesan;
    @Basic(optional = false)
    @Column(name = "waktu")
    private String waktu;
    @Basic(optional = false)
    @Column(name = "smsc")
    private String smsc;
    @Basic(optional = false)
    @Column(name = "status")
    private int status;

    public Inbox() {
    }

    public Inbox(Integer id) {
        this.id = id;
    }

    public Inbox(Integer id, String pengirim, String isiPesan, String waktu, String smsc, int status) {
        this.id = id;
        this.pengirim = pengirim;
        this.isiPesan = isiPesan;
        this.waktu = waktu;
        this.smsc = smsc;
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPengirim() {
        return pengirim;
    }

    public void setPengirim(String pengirim) {
        this.pengirim = pengirim;
    }

    public String getIsiPesan() {
        return isiPesan;
    }

    public void setIsiPesan(String isiPesan) {
        this.isiPesan = isiPesan;
    }

    public String getWaktu() {
        return waktu;
    }

    public void setWaktu(String waktu) {
        this.waktu = waktu;
    }

    public String getSmsc() {
        return smsc;
    }

    public void setSmsc(String smsc) {
        this.smsc = smsc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Inbox)) {
            return false;
        }
        Inbox other = (Inbox) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "azhar.persistance.Inbox[id=" + id + "]";
    }

}
